3.3053 \(\int (a+b x)^{-n} (c+d x) (e+f x)^n \, dx\)

Optimal. Leaf size=135 \[ \frac{(a+b x)^{-n} (e+f x)^{n+1} \left (-\frac{f (a+b x)}{b e-a f}\right )^n (b (2 c f-d e (1-n))-a d f (n+1)) \, _2F_1\left (n,n+1;n+2;\frac{b (e+f x)}{b e-a f}\right )}{2 b f^2 (n+1)}+\frac{d (a+b x)^{1-n} (e+f x)^{n+1}}{2 b f} \]

[Out]

(d*(a + b*x)^(1 - n)*(e + f*x)^(1 + n))/(2*b*f) + ((b*(2*c*f - d*e*(1 - n)) - a*d*f*(1 + n))*(-((f*(a + b*x))/
(b*e - a*f)))^n*(e + f*x)^(1 + n)*Hypergeometric2F1[n, 1 + n, 2 + n, (b*(e + f*x))/(b*e - a*f)])/(2*b*f^2*(1 +
 n)*(a + b*x)^n)

________________________________________________________________________________________

Rubi [A]  time = 0.0757344, antiderivative size = 134, normalized size of antiderivative = 0.99, number of steps used = 3, number of rules used = 3, integrand size = 22, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.136, Rules used = {80, 70, 69} \[ \frac{(a+b x)^{-n} (e+f x)^{n+1} \left (-\frac{f (a+b x)}{b e-a f}\right )^n (-a d f (n+1)+2 b c f-b d e (1-n)) \, _2F_1\left (n,n+1;n+2;\frac{b (e+f x)}{b e-a f}\right )}{2 b f^2 (n+1)}+\frac{d (a+b x)^{1-n} (e+f x)^{n+1}}{2 b f} \]

Antiderivative was successfully verified.

[In]

Int[((c + d*x)*(e + f*x)^n)/(a + b*x)^n,x]

[Out]

(d*(a + b*x)^(1 - n)*(e + f*x)^(1 + n))/(2*b*f) + ((2*b*c*f - b*d*e*(1 - n) - a*d*f*(1 + n))*(-((f*(a + b*x))/
(b*e - a*f)))^n*(e + f*x)^(1 + n)*Hypergeometric2F1[n, 1 + n, 2 + n, (b*(e + f*x))/(b*e - a*f)])/(2*b*f^2*(1 +
 n)*(a + b*x)^n)

Rule 80

Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Simp[(b*(c + d*x)
^(n + 1)*(e + f*x)^(p + 1))/(d*f*(n + p + 2)), x] + Dist[(a*d*f*(n + p + 2) - b*(d*e*(n + 1) + c*f*(p + 1)))/(
d*f*(n + p + 2)), Int[(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n, p}, x] && NeQ[n + p + 2,
0]

Rule 70

Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Dist[(c + d*x)^FracPart[n]/((b/(b*c - a*d)
)^IntPart[n]*((b*(c + d*x))/(b*c - a*d))^FracPart[n]), Int[(a + b*x)^m*Simp[(b*c)/(b*c - a*d) + (b*d*x)/(b*c -
 a*d), x]^n, x], x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[b*c - a*d, 0] &&  !IntegerQ[m] &&  !IntegerQ[n] &&
(RationalQ[m] ||  !SimplerQ[n + 1, m + 1])

Rule 69

Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((a + b*x)^(m + 1)*Hypergeometric2F1[
-n, m + 1, m + 2, -((d*(a + b*x))/(b*c - a*d))])/(b*(m + 1)*(b/(b*c - a*d))^n), x] /; FreeQ[{a, b, c, d, m, n}
, x] && NeQ[b*c - a*d, 0] &&  !IntegerQ[m] &&  !IntegerQ[n] && GtQ[b/(b*c - a*d), 0] && (RationalQ[m] ||  !(Ra
tionalQ[n] && GtQ[-(d/(b*c - a*d)), 0]))

Rubi steps

\begin{align*} \int (a+b x)^{-n} (c+d x) (e+f x)^n \, dx &=\frac{d (a+b x)^{1-n} (e+f x)^{1+n}}{2 b f}+\frac{(2 b c f-d (b e (1-n)+a f (1+n))) \int (a+b x)^{-n} (e+f x)^n \, dx}{2 b f}\\ &=\frac{d (a+b x)^{1-n} (e+f x)^{1+n}}{2 b f}+\frac{\left ((2 b c f-d (b e (1-n)+a f (1+n))) (a+b x)^{-n} \left (\frac{f (a+b x)}{-b e+a f}\right )^n\right ) \int (e+f x)^n \left (-\frac{a f}{b e-a f}-\frac{b f x}{b e-a f}\right )^{-n} \, dx}{2 b f}\\ &=\frac{d (a+b x)^{1-n} (e+f x)^{1+n}}{2 b f}+\frac{(2 b c f-b d e (1-n)-a d f (1+n)) (a+b x)^{-n} \left (-\frac{f (a+b x)}{b e-a f}\right )^n (e+f x)^{1+n} \, _2F_1\left (n,1+n;2+n;\frac{b (e+f x)}{b e-a f}\right )}{2 b f^2 (1+n)}\\ \end{align*}

Mathematica [A]  time = 0.103303, size = 108, normalized size = 0.8 \[ \frac{(a+b x)^{-n} (e+f x)^{n+1} \left (\frac{\left (\frac{f (a+b x)}{a f-b e}\right )^n (-a d f (n+1)+2 b c f+b d e (n-1)) \, _2F_1\left (n,n+1;n+2;\frac{b (e+f x)}{b e-a f}\right )}{n+1}+d f (a+b x)\right )}{2 b f^2} \]

Antiderivative was successfully verified.

[In]

Integrate[((c + d*x)*(e + f*x)^n)/(a + b*x)^n,x]

[Out]

((e + f*x)^(1 + n)*(d*f*(a + b*x) + ((2*b*c*f + b*d*e*(-1 + n) - a*d*f*(1 + n))*((f*(a + b*x))/(-(b*e) + a*f))
^n*Hypergeometric2F1[n, 1 + n, 2 + n, (b*(e + f*x))/(b*e - a*f)])/(1 + n)))/(2*b*f^2*(a + b*x)^n)

________________________________________________________________________________________

Maple [F]  time = 0.058, size = 0, normalized size = 0. \begin{align*} \int{\frac{ \left ( fx+e \right ) ^{n} \left ( dx+c \right ) }{ \left ( bx+a \right ) ^{n}}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*x+c)*(f*x+e)^n/((b*x+a)^n),x)

[Out]

int((d*x+c)*(f*x+e)^n/((b*x+a)^n),x)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (d x + c\right )}{\left (f x + e\right )}^{n}}{{\left (b x + a\right )}^{n}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*(f*x+e)^n/((b*x+a)^n),x, algorithm="maxima")

[Out]

integrate((d*x + c)*(f*x + e)^n/(b*x + a)^n, x)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{{\left (d x + c\right )}{\left (f x + e\right )}^{n}}{{\left (b x + a\right )}^{n}}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*(f*x+e)^n/((b*x+a)^n),x, algorithm="fricas")

[Out]

integral((d*x + c)*(f*x + e)^n/(b*x + a)^n, x)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*(f*x+e)**n/((b*x+a)**n),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (d x + c\right )}{\left (f x + e\right )}^{n}}{{\left (b x + a\right )}^{n}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*(f*x+e)^n/((b*x+a)^n),x, algorithm="giac")

[Out]

integrate((d*x + c)*(f*x + e)^n/(b*x + a)^n, x)